package com.cn.clp.service.Server;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;

@Service
public class ActiveMQServer {

//        @Autowired
//
//        private JmsTemplate jmsTemplate;
//        @Autowired
//        @Qualifier("userMQ")
//        private Destination destination;
//
//        public void sendMQ(final String msg) {
//            jmsTemplate.send(destination, new MessageCreator() {
//                @Override
//                public Message createMessage(Session session) throws JMSException {
//                    return session.createTextMessage(msg);
//                }
//            });
//
//        }
}
